{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# 1. Assignment 4\n", "\n", "CS240, Fall 2015, Professor Blank\n", "\n", "\n", "Student 1:\n", "\n", "Student 2:\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Write machine code for each of the following problems, assemble them, and run them. Point out how to tell that you got the answer. Explain how your code works." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1.1 Problem" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Add up the numbers 1 through 10 (use a branch)." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1.2 Problem" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Add up the numbers 10 through 20 (use a branch)." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1.3 Problem" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Subtract 5 from 7." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1.4 Problem" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Subtract 7 from 5." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1.5 Problem" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Multiply 2 times 7. Multiplying by two could be called \"shift left\".... why?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1.6 Problem" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Multiply 5 times 7 in a generic way. Make your code so that you could change either 7 or 5 and the code would still work." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1.7 Problem" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "How many times will 3 go into 11? Make your code so that you could change either 3 or 11 and the code would still work." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1.8 Problem" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "How many times will 4 go into 33? Make your code so that you could change the data and it would still work." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1.9 Problem" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Is the number 5 in the range of numbers 1 through 10? Make your code so that you could change 10 or 5 and it would still work." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1.10 Problem\n", "\n", "Put a number in R0. If the number in R0 is even, put the number xFF in R1, otherwise put x00 in R1." ] } ], "metadata": { "kernelspec": { "display_name": "Calysto LC3", "language": "gas", "name": "calysto_lc3" }, "language_info": { "file_extension": ".asm", "mimetype": "text/x-gas", "name": "gas" } }, "nbformat": 4, "nbformat_minor": 0 }